<% @page_title = "Edit Template File" %>

<% if @campaign.present? %>
  <ol class="breadcrumb">
    <li><%= link_to "Template", edit_template_path(@attachment.attachable_id, campaign_id: @campaign.id) %></li>
    <li><%= link_to "Campaign", campaign_path(@campaign) %></li>
  </ol>
<% end %>

<%= form_for(:attachment, :url => {:action => 'update_attachment', :format => params[:format]}) do |f| %>
  <div class="form-buttons">
    <h3>
      Edit Attachment - <%= File.basename(@attachment.file.to_s) %>
      <%= submit_tag("Save", class: 'btn btn-primary') %>
    </h3>
  </div>

  <%= text_area_tag("attachment_content", @attachment_content,
   rows: 35 ,class: 'form-control') %>
<% end %>


